﻿@inject IStringLocalizer<BlockNormal> Localizer

<div class="mb-3" style="height: 21px;">
    <Block OnQueryCondition="OnQueryCondition" Name="Normal">
        <div>@Localizer["Content"]</div>
    </Block>
</div>
<Button Icon="@GetIcon()" Text="@GetText()" OnClick="ToggleCondition" />

@code {
    private bool IsShow { get; set; } = true;
    private string GetIcon() => IsShow ? "fa-solid fa-eye-slash" : "fa-solid fa-eye";
    private string GetText() => IsShow ? Localizer["IsHide"] : Localizer["IsShow"];
    private void ToggleCondition() => IsShow = !IsShow;
    private Task<bool> OnQueryCondition(string name) => Task.FromResult(IsShow);
}
